/**
 * 首页展示。container控件加载入口。
 */
import React from "react";
//获取整体关联
import { Router, Scene, Modal } from "enoad-common/src/core/router";
import { Provider, connect } from "react-redux";
const RouterWithRedux = connect()(Router);
//获取整体关联
//创建store
import reducers from "./reducers";
import thunk from "redux-thunk";
import { createStore, applyMiddleware } from "redux";
const createStoreWithMiddleware = applyMiddleware(thunk)(createStore);
const store = createStoreWithMiddleware(reducers);
//创建store

import { initSences } from "./util/AppInit";
//列表界面
import StoreShop from "../components/StoreShop";
export default class InitMain extends React.Component {
  constructor(props: any) {
    super(props);
  }

  render() {
    console.log("[InitMain]", initSences());
    return (
      <Provider store={store}>
        <RouterWithRedux>
          <Scene
            key="xsy_tab_main"
            tabs={true}
            tabBarStyle={{ backgroundColor: "white" }}
            navigationBarStyle={{ backgroundColor: "white" }}
          >
            {initSences()}
          </Scene>
        </RouterWithRedux>
      </Provider>
    );
  }
}
